import request from '@/utils/request'

// 查询学生信息列表
export function studentList(query) {
  return request({
    url: '/basic/student/list',
    method: 'get',
    params: query
  })
}
// 根据注册号查询学生学生状态信息
export function studentGrad(query) {
  return request({ 
    url: '/basic/student/grad/' + query,
    method: 'get',
  })
}
// 获取学生信息详细信息
export function studentInfor(data) {
  return request({
    url: '/basic/student/' + data,
    method: 'get',
  })
}
// 新增学生信息
export function addstudent(data) {
  return request({
    url: '/basic/student',
    method: 'post',
    data: data
  })
}
// 修改学生信息
export function updataDuties(data) {
  return request({
    url: '/basic/student',
    method: 'put',
    data: data
  })
}
// 删除学生信息
export function delStudent(data) {
  return request({
    url: '/basic/student/' + data,
    method: 'delete',

  })
}
// 根据学号或注册号和学生名称查询学生信息
export function queryStudent(data) {
  return request({
    url: '/basic/student/queryStudent',
    method: 'get',
    params: data
  })
}

// 根据学生id/学期获取某个学年成绩
export function getStudentScore(data, params) {
  return request({
    url: '/basic/score/getStudentScore/' + data + '/' + params,
    method: 'get',
  })
}

// 根据学生系统年份和注册号查询缴费信息列表
export function getStudentBayList(data, params) {
  return request({
    url: '/system/studentBay/getStudentBayList/' + data + '/' + params,
    method: 'get',
  })
}

// 查询学生成绩信息列表
export function scoreList(params) {
  return request({
    url: '/basic/score/list',
    method: 'get',
    params: params
  })
}
// 根据学生id获取家庭信息
export function getFamilyInfo(params) {
  return request({
    url: '/basic/family/getFamilyInfo/' + params,
    method: 'get',
  })
}
// 查询学生家庭信息列表
export function familyList(params) {
  return request({
    url: '/basic/family/list',
    method: 'get',
    params: params
  })
}
// 查询学生家庭信息列表
export function delFamily(params) {
  return request({
    url: '/basic/family/' + params,
    method: 'delete',
  })
}
// 添加学生家庭信息列表
export function AddFamily(params) {
  return request({
    url: '/basic/family',
    method: 'post',
    data: params
  })
}
// 批量添加学生家庭信息列表
export function familyBatch(params) {
  return request({
    url: '/basic/family/batch',
    method: 'post',
    data: params
  })
}
// 模板下载
export function importTemplate() {
  return request({
    url: '/basic/student/importTemplate',
    method: 'post',
    responseType: 'blob'
  })
}


// 根据 id 或名称 获取学生信息
export function queryStudentInfoByParam(params) {
  return request({
    url: '/basic/student/queryByParam',
    method: 'get',
    params
  })
}
// 班级树形结构
export function classTree() {
  return request({
    url: '/basic/class/classTree',
    method: 'get',
  })
}
// 有权限查询学院下拉树
export function collegeSelect() {
  return request({
    url: '/system/dept/collegeSelect',
    method: 'get',
  })
}
// 无权限查询学院下拉树
export function notPreCollegeSelect() {
  return request({
    url: '/system/dept/notPreCollegeSelect',
    method: 'get',
  })
}


